﻿@using Pay.Model.Model
@using Pay.Common
@using Webdiyer.WebControls.Mvc
@using Pay.Model.Enums
@model PagedList<ApplyInfo>
<table class="table table-hover">
    <thead>
        <tr>
            <th>ID</th>
            <th>商户名</th>
            <th>金额</th>
            <th>银行卡</th>
            <th>状态</th>
         
            <th>申请时间</th>
            @if (ViewBag.IsShow)
            {
                <th>操作</th>
            }
        </tr>
    </thead>
    <tbody>
        @{ int i = 0;}
        @foreach (var item in Model)
        {
            <tr>
                @*<td>
                        <div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='2'><i class="layui-icon">&#xe605;</i></div>
                    </td>*@
                <td>@(Model.StartItemIndex + i++)</td>
                <td>@item.MerName</td>
                <td>@item.ApplyAmount.ToString("F2")</td>
                <td>@item.BankCard</td>
                <td>@Pay.Common.EnumHelper.GetDescription(item.Status)</td>
                <td>@item.CreateTime.ToString("yyyy-MM-dd HH:mm:ss")</td>

                @if (ViewBag.IsShow)
                {
                    if (item.Status != ApplyStatus.WaitPass)
                    {
                        <td class="td-manage">
                            <a title="审批" class="layui-btn-disabled" onclick="" href="javascript:;">
                                审批
                            </a>
                        </td>
                    }
                    else
                    {
                        <td class="td-manage">
                            <a title="审批" class="btn-xs btn-success" onclick="check(this,@item.Id)" href="javascript:;">
                                审批
                            </a>
                        </td>
                    }
                }
            </tr>
        }
    </tbody>
</table>




<div class="text-center">
    @*<div style="float:left;width:50%">当前 @Model.CurrentPageIndex 页，共 @Model.TotalPageCount 页, 共 @Model.TotalItemCount items 条</div>*@
    <span> 当前 @Model.CurrentPageIndex 页，共 @Model.TotalPageCount 页, 共 @Model.TotalItemCount  条</span>
    <nav>
        @Ajax.Pager(Model, new PagerOptions { PageIndexParameterName = "id", ContainerTagName = "ul", CssClass = "pagination", CurrentPagerItemTemplate = "<li class=\"active\"><a  href=\"javascript:;\">{0}</a></li>", DisabledPagerItemTemplate = "<li class=\"disabled\"><a>{0}</a></li>", PagerItemTemplate = "<li>{0}</li>" }, new MvcAjaxOptions { UpdateTargetId = "articles", HttpMethod = "Post", DataFormId = "searchForm" })
    </nav>
</div>



